//
//  MKOrderItemObject.m
//  YangDongXi
//
//  Created by cocoa on 15/4/17.
//  Copyright (c) 2015年 cocoa. All rights reserved.
//

#import "MKOrderItemObject.h"
#import "MKValueAddedServiceObject.h"

@implementation MKOrderItemObject

+ (NSDictionary *)propertyAndKeyMap
{
    return @{
             @"orderItemUid" : @"order_item_uid",
             @"itemUid" : @"item_uid",
             @"itemName" : @"item_name",
             @"iconUrl" : @"icon_url",
             @"skuSnapshot" : @"sku_snapshot",
             @"deliveryType" : @"delivery_type",
             @"itemTypeOne":@"item_type",
             @"paymentAmount":@"payment_amount",
             @"refundStatus":@"refund_status",
             @"paymentAmount":@"payment_amount",
             @"discountAmount":@"discount_amount",
             @"point":@"point_amount",
             @"activityInfo":@"activity_info",
             @"cartItemUid" : @"cart_item_uid",
             @"marketPrice" : @"market_price",
             @"promotionPrice" : @"promotion_price",
             @"wirelessPrice" : @"wireless_price",
             @"valueServiceList":@"service_list",
             @"totalAddTax" : @"total_add_tax"
             };
}

+ (NSString *)refundStatusWithString:(MKRefundStatus)refundStatus{
    return @{@(MKApply)            : @"申请退款中" ,
             @(MKProcessing)       : @"等待退款" ,
             @(MKrefuse)           : @"不同意" ,
             @(MKFinished)         : @"退款完成" ,
             @(MKFailed)           : @"退款失败" }[@(refundStatus)];
}
//
+ (Class)classForArrayItemWithName:(NSString *)propertyName andIndex:(NSInteger)index
{
    if ([propertyName isEqualToString:@"activityInfo"])
    {
        return [MKActivityInfoObject class];
    }
    if ([propertyName isEqualToString:@"valueServiceList"]) {
        return [MKValueAddedServiceObject class];
    }
    return nil;
}


@end
